﻿/*------------------------------------------------
// File Description: InboundInspect DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-04-29 10:06:32
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 入库检
    /// </summary>
    [Table(nameof(InboundInspect))]
    public class InboundInspect : BaseEntity
    {
        private string _refuseReason;
        private string _packBatchNo;
        private string _packNo;

        #region Public Property

        ///<Summary>
        /// 打包批次号
        ///</Summary>
        public string PackBatchNo
        {
            get { return string.IsNullOrWhiteSpace(_packBatchNo) ? string.Empty : _packBatchNo; }
            set { _packBatchNo = value; }
        }

        ///<Summary>
        /// 打包编号
        ///</Summary>
        public string PackNo
        {
            get { return string.IsNullOrWhiteSpace(_packNo) ? string.Empty : _packNo; }
            set { _packNo = value; }
        }

        ///<Summary>
        /// 检核人
        ///</Summary>
        public int InspectBy { get; set; }

        ///<Summary>
        /// 检核时间
        ///</Summary>
        public DateTime? InspectTime { get; set; }

        ///<Summary>
        /// 检核状态
        ///</Summary>
        public Enum.PackInboundInspectStatus Status { get; set; }

        ///<Summary>
        /// 决绝原因
        ///</Summary>
        public string RefuseReason
        {
            get { return string.IsNullOrWhiteSpace(_refuseReason) ? string.Empty : _refuseReason; }
            set { _refuseReason = value; }
        }

        /// <summary>
        /// ERP入库任务是否已添加
        /// </summary>
        public bool ErpTaskExcuted { get; set; } = false;
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 入库检
        /// </summary>
        public virtual DbSet<InboundInspect> InboundInspects { get; set; }
    }
}
